import Vue from 'vue'
//入口文件载入vue-route
import VRouter from 'vue-router'
//使用
Vue.use(VRouter)
//导入承载页面
// import Home from '@/page/home'
// import News from '@/page/news'
export default new VRouter({
    routes:[
      {path:'/',redirect:'/home'},
      {path:'/home',component:resolve=>{require(['@/page/home'],resolve)}},
      {path:'/animeta',component:resolve=>{require(['@/page/animeta/transition'],resolve)}},
      {path:'/lifecircle',component:resolve=>{require(['@/page/lifecircle'],resolve)}},
      {path:'/router',component:resolve=>{require(['@/page/route'],resolve)},
            children:[
            {path:'par/:id',component:resolve=>{require(['@/page/router/par'],resolve)}},
            {path:'child/:id',  component:resolve=>{require(['@/page/router/child'],resolve)}}
          ]
      },
      {path:'/comPage',component:resolve=>{require(['@/page/com/comPage'],resolve)},
              children:[
                  {path:"base",component:resolve=>{require(["@/page/com/base"],resolve)}},
                  {path:"son",component:resolve=>{require(["@/page/com/son"],resolve)}},
                  {path:"toParent",component:resolve=>{require(["@/page/com/toParent"],resolve)}},
                  {path:"is",component:resolve=>{require(["@/page/com/is"],resolve)}},
                  {path:"slot",component:resolve=>{require(["@/page/com/slot"],resolve)}},
                  {path:"slotName",component:resolve=>{require(["@/page/com/slotName"],resolve)}},
                  {path:"starPage",component:resolve=>{require(["@/page/com/starPage"],resolve)}},
              ]},
      {path:'/mintPage',component:resolve=>{require(['@/page/mint/mintPage'],resolve)},
              children:[
                {path:"toast",component:resolve=>{require(["@/page/mint/toast"],resolve)}},
                {path:"lozyload",component:resolve=>{require(["@/page/mint/lozyload"],resolve)}}
              ]



    },



            ]
})
